package com.turing.system.controller;

import com.turing.system.entity.SysMenu;
import com.turing.system.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

import java.util.List;

/**
 *  @author: shihonggang
 *  @Date: 2023/4/8 20:58
 *  @Description: 菜单控制器
 */
@RestController
@RequestMapping("sysMenu")
public class SysMenuController {

    @Autowired
    private SysMenuService sysMenuService;

    /**
     *  @author: shihonggang
     *  @Date: 2023/4/8 20:58
     *  @Description: 菜单列表
     */
    @GetMapping("listMenu")
    public Result listMenu(){
        List<SysMenu> menuList = sysMenuService.listMenu();
        return Result.success(menuList);
    }
}
